<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="tag" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>

<link rel="stylesheet"
	href="<%=request.getContextPath()%>/resources/css/form.css"
	type="text/css" />

</head>
<body>

	<div id="content">
		<c:url var="url" value="/manager/managerPanel.html" />
		<form:form action="${url}" commandName="manager">
			<form:hidden path="id" />

			<fieldset>
				<div class="form-row">
					<label for="username"></label>
					<form:select path="username" items="${managers}"
						itemLabel="username" />
					<form:errors path="username" cssClass="error" />

					<input type="submit" class="submit" />
				</div>

				<div class="form-Details">
					<c:choose>
						<c:when test="${not empty selectedManager}">
							<table id="selectedManager" border="0">
								<tr>
									<td id="head"><tag:message code="manager.name" /></td>
									<td>${selectedManager.name}</td>
								</tr>
								<tr>
									<td id="head"><tag:message code="manager.surname" /></td>
									<td>${selectedManager.surname}</td>
								</tr>
								<tr>
									<td id="head"><tag:message code="manager.emailAdress" /></td>
									<td>${selectedManager.emailAdress}</td>
								</tr>
								<tr>
									<td id="head"><tag:message code="manager.numberOfFreeDays" /></td>
									<td>${selectedManager.numberOfFreeDays}</td>
								</tr>
								<tr>
									<td id="head"><tag:message code="manager.telephoneNumber" /></td>
									<td>${selectedManager.telephoneNumber}</td>
								</tr>
							</table>
							
							<iframe id="workersFrame" src="/FreeTimeTool/manager/details.html" width=270 height=250 frameborder="0"> </iframe>
							
						</c:when>
						<c:otherwise> please select manager </c:otherwise>
					</c:choose>
				</div>
			</fieldset>
		</form:form>

		
	</div>
</body>
</html>